<template>
  <div>
    <el-button size="mini" type="primary" icon="el-icon-edit" @click="to"/>
    <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
  </div>
</template>
<script>
import eForm from './form'
export default {
  components: { eForm },
  props: {
    data: {
      type: Object,
      required: true
    },
    sup_this: {
      type: Object,
      required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form = {
        id: this.data.id,
        planName: this.data.planName,
        objId: this.data.objId,
        objName: this.data.objName,
        templateId: this.data.templateId,
        templateName: this.data.templateName,
        planDesc: this.data.planDesc,
        periodId: this.data.periodId,
        periodName: this.data.periodName,
        inspectorId: this.data.inspectorId,
        inspectorName: this.data.inspectorName,
        vehTypeId: this.data.vehTypeId,
        vehTypeName: this.data.vehTypeName,
        startTime: this.data.startTime,
        endTime: this.data.endTime,
        operateTime: this.data.operateTime,
        state: this.data.state
      }
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
